package com.wudl.govern.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

/**
 * @author ：wudl
 * @date ：Created in 2022-04-05 13:18
 * @description：
 * @modified By：
 * @version: 1.0
 */

public class ControlTask extends PageBase {
    private Integer id;
    //数据源Id
    @NotNull(message = "数据源id不能为空！")
    private Integer sourceId;
    //表Id
    @NotNull(message = "表id不能为空！")
    private Integer tableId;
    //任务名
    @NotBlank(message = "任务名不能为空！")
    @Size(max = 20,message = "任务名20字符以内")
    private String taskName;
    //执行方式
    @NotBlank(message = "执行方式不能为空!")
    private String executionWay;
    //频率
    private String frequency;
    //执行策略
    @NotBlank(message = "执行不能为空！")
    private String executionPolicy;
    //任务描述
    @Size(max = 100,message = "任务描述100字符以内")
    private String taskDescribe;
    //cron表达式
    @Size(max = 100,message = "corn表达式100字符以内")
    private String cronDescribe;
    //开始时间
    private Date startDate;
    //结束时间
    private Date endDate;

    //任务状态
    private String taskState;
    //创建人
    private String createUser;
    //创建时间
    private Date createDate;
    //修改人
    private String uppUser;
    //修改时间
    private Date uppDate;
    //数据类型
    private String dataType;
    //数据状态
    private Integer dataState;

    private String dbType;

    private String dbHost;

    private Integer dbPort;

    private String dbName;

    private String jdbcParam;

    private String dbDriver;

    private String userName;

    private String password;

    private String runState;

    private List<ControlRule> controlRules;
    private Integer runNum;

    @NotBlank(message = "不能为空！")
    private String tableName;

    public List<ControlRule> getControlRules() {
        return controlRules;
    }

    public void setControlRules(List<ControlRule> controlRules) {
        this.controlRules = controlRules;
    }
    private String runJobId;

    private Integer minute;

    private String tablePkColumn;

    private Integer rectification;

    /**数据源id集合*/
    private List sourceIds;

    /**数据表id集合*/
    private List tableIds;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getSourceId() {
        return sourceId;
    }

    public void setSourceId(Integer sourceId) {
        this.sourceId = sourceId;
    }

    public Integer getTableId() {
        return tableId;
    }

    public void setTableId(Integer tableId) {
        this.tableId = tableId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName == null ? null : taskName.trim();
    }

    public String getExecutionWay() {
        return executionWay;
    }

    public void setExecutionWay(String executionWay) {
        this.executionWay = executionWay == null ? null : executionWay.trim();
    }

    public String getFrequency() {
        return frequency;
    }

    public void setFrequency(String frequency) {
        this.frequency = frequency == null ? null : frequency.trim();
    }

    public String getExecutionPolicy() {
        return executionPolicy;
    }

    public void setExecutionPolicy(String executionPolicy) {
        this.executionPolicy = executionPolicy == null ? null : executionPolicy.trim();
    }

    public String getTaskDescribe() {
        return taskDescribe;
    }

    public void setTaskDescribe(String taskDescribe) {
        this.taskDescribe = taskDescribe == null ? null : taskDescribe.trim();
    }

    public String getCronDescribe() {
        return cronDescribe;
    }

    public void setCronDescribe(String cronDescribe) {
        this.cronDescribe = cronDescribe == null ? null : cronDescribe.trim();
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getTaskState() {
        return taskState;
    }

    public void setTaskState(String taskState) {
        this.taskState = taskState == null ? null : taskState.trim();
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUppUser() {
        return uppUser;
    }

    public void setUppUser(String uppUser) {
        this.uppUser = uppUser == null ? null : uppUser.trim();
    }

    public Date getUppDate() {
        return uppDate;
    }

    public void setUppDate(Date uppDate) {
        this.uppDate = uppDate;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType == null ? null : dataType.trim();
    }

    public Integer getDataState() {
        return dataState;
    }

    public void setDataState(Integer dataState) {
        this.dataState = dataState;
    }

    public String getDbType() {
        return dbType;
    }

    public void setDbType(String dbType) {
        this.dbType = dbType == null ? null : dbType.trim();
    }

    public String getDbHost() {
        return dbHost;
    }

    public void setDbHost(String dbHost) {
        this.dbHost = dbHost == null ? null : dbHost.trim();
    }

    public Integer getDbPort() {
        return dbPort;
    }

    public void setDbPort(Integer dbPort) {
        this.dbPort = dbPort;
    }

    public String getDbName() {
        return dbName;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName == null ? null : dbName.trim();
    }

    public String getJdbcParam() {
        return jdbcParam;
    }

    public void setJdbcParam(String jdbcParam) {
        this.jdbcParam = jdbcParam == null ? null : jdbcParam.trim();
    }

    public String getDbDriver() {
        return dbDriver;
    }

    public void setDbDriver(String dbDriver) {
        this.dbDriver = dbDriver == null ? null : dbDriver.trim();
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getRunState() {
        return runState;
    }

    public void setRunState(String runState) {
        this.runState = runState == null ? null : runState.trim();
    }

    public Integer getRunNum() {
        return runNum;
    }

    public void setRunNum(Integer runNum) {
        this.runNum = runNum;
    }

    public String getRunJobId() {
        return runJobId;
    }

    public void setRunJobId(String runJobId) {
        this.runJobId = runJobId == null ? null : runJobId.trim();
    }

    public Integer getMinute() {
        return minute;
    }

    public void setMinute(Integer minute) {
        this.minute = minute;
    }

    public String getTablePkColumn() {
        return tablePkColumn;
    }

    public void setTablePkColumn(String tablePkColumn) {
        this.tablePkColumn = tablePkColumn == null ? null : tablePkColumn.trim();
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName == null ? null : tableName.trim();
    }

    public Integer getRectification() {
        return rectification;
    }

    public void setRectification(Integer rectification) {
        this.rectification = rectification;
    }

    public List getSourceIds() {
        return sourceIds;
    }

    public void setSourceIds(List sourceIds) {
        this.sourceIds = sourceIds;
    }

    public List getTableIds() {
        return tableIds;
    }

    public void setTableIds(List tableIds) {
        this.tableIds = tableIds;
    }
}